<?php


header('Content-Type:text/html;charset=utf-8');
require('../public/header.php');
$res=select2($con,'wenzhang','where `id`='.$_GET['id'])[0];
$res2=select2($con,'fenlei');
?>

<!--/sidebar-->
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="/admin/guanli.php">首页</a><span class="crumb-step">&gt;</span>
            <a class="crumb-name" href="/admin/wenzhang/index.php">文章管理</a>
            <span class="crumb-step">&gt;</span>
            <span>编辑文章</span>
            </div>
        </div>
        <form action="/admin/wenzhang/update2.php" method="post">
        <input type="hidden" value="<?php echo $_GET['id']?>" name="sid">
        <table border=1 width=600>
                <tr>
                    <td>栏目：</td>
                    <td>
                        <select name="fid">
                        <?php
                        foreach($res2 as $v){
                             echo '<option value='.$v['id'].'>'.$v['leibie'].'</option>';
                        }                        
                        ?>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>标题：</td>
                    <td><input type="text" name='title' value="<?php echo $res['title'] ?>" style="width:500px"></td>
                </tr>
                <tr>
                    <td>内容：</td>
                    <td><input type="text" name='content' value="<?php echo $res['content'] ?>" style="width:500px;height:300px"></td>
                </tr>
                <tr>
                    <td>标签：</td>
                    <td><input type="text" name='biaoqian' value="<?php echo $res['biaoqian'] ?>" style="width:500px"></td>
                </tr>
                <tr>
                    <td>状态</td>
                    <td>
                    <input type="radio" name='zhuangtai' value='1' <?php echo $res['zhuangtai'] == '1' ?'checked':'' ?> >1
                    <input type="radio" name='zhuangtai' value='0' <?php echo $res['zhuangtai'] == '0' ?'checked':'' ?> >0
                    </td>
                </tr>
        </table>
        <input type="submit" value="提交">
        </form>
<!--/main-->

<?php
require('../public/footer.php');